package com.hncc.kumao.biz.impl;
import java.util.List;

import com.hncc.kumao.biz.IOfflineDownloadTaskBiz;
import com.hncc.kumao.dao.IOfflineDownloadTaskDao;
import com.hncc.kumao.entity.OfflineDownloadTask;
import com.hncc.kumao.entity.User;
/**
 * 业务逻辑类
 * @author Administrator
 *
 */
public class OfflineDownloadTaskBiz implements IOfflineDownloadTaskBiz {

	private IOfflineDownloadTaskDao offlineDownloadTaskDao;
	public void setOfflineDownloadTaskDao(IOfflineDownloadTaskDao offlineDownloadTaskDao) {
		this.offlineDownloadTaskDao = offlineDownloadTaskDao;
	}
	
	//添加
    public String add(OfflineDownloadTask offlineDownloadTask) {
        return offlineDownloadTaskDao.add(offlineDownloadTask);
    }

    //根据id获取
    public OfflineDownloadTask get(String taskId) {
        return offlineDownloadTaskDao.get(taskId);
    }

    //更新
    public void update(OfflineDownloadTask offlineDownloadTask) {
        offlineDownloadTaskDao.update(offlineDownloadTask);
    }

    /**
     * 获取任务列表
     */
    public List<OfflineDownloadTask> getList(OfflineDownloadTask task1, OfflineDownloadTask task2, Object param) {
        List<OfflineDownloadTask> list = offlineDownloadTaskDao.getList(task1, task2, param);
        return list;
    }
    
    /**
     * 分页查询任务列表
     */
    public List<OfflineDownloadTask> getListByPage(OfflineDownloadTask task1, OfflineDownloadTask task2, Object param, int firstResult, int maxResults) {
        List<OfflineDownloadTask> list = offlineDownloadTaskDao.getListByPage(task1, task2, param, firstResult, maxResults);
        return list;
    }
    
    /**
     * 统计记录个数
     */
    public long getCount(OfflineDownloadTask task1, OfflineDownloadTask task2, Object param) {
        return offlineDownloadTaskDao.getCount(task1, task2, param);
    }

    /**
     * 统计任务状态
     */
    public List getTaskStateInfo() {
        return offlineDownloadTaskDao.getTaskStateInfo();
    }
}
